The Weak-Heap Family of Priority Queues in Theory and Praxis
نویسندگان
چکیده
In typical applications, a priority queue is used to execute a sequence of n insert , m decrease, and n delete-min operations, starting with an empty structure. We study the performance of different priority queues for this type of operation sequences both theoretically and experimentally. In particular, we focus on weak heaps, weak queues, and their relaxed variants. We prove that for relaxed weak heaps the execution of any such sequence requires at most 2m + 1.5n lg n element comparisons. This improves over the best bound, at most 2m + 2.89n lg n element comparisons, known for the existing variants of Fibonacci heaps. We programmed six members of the weak-heap family of priority queues. For random data sets, experimental results show that non-relaxed versions are performing best and that rank-relaxed versions are slightly faster than run-relaxed versions. Compared to weak-heap variants, the corresponding weak-queue variants are slightly better in time but not in the number of element comparisons.
منابع مشابه
Two Constant-Factor-Optimal Realizations of Adaptive Heapsort
In this paper we introduce two efficient priority queues. For both, insert requires O(1) amortized time and extract-min O(lgn) worstcase time including at most lgn+O(1) element comparisons, where n is the number of elements stored. One priority queue is based on a weak heap (array-based) and the other on a weak queue (pointer-based). In both, the main idea is to temporarily store the inserted e...
متن کاملExperimental Study of High Performance Priority Queues
The priority queue is a very important and widely used data structure in computer science, with a variety of applications including Dijkstra’s Single Source Shortest Path algorithm on sparse graph types. This study presents the experimental results of a variety of priority queues. The focus of the experiments is to measure the speed and performance of highly specialized priority queues in out-o...
متن کاملRank-Relaxed Weak Queues: Faster than Pairing and Fibonacci Heaps?
A run-relaxed weak queue by Elmasry et al. (2005) is a priority queue data structure with insert and decrease-key in O(1) as well as delete and delete-min in O(log n) worst-case time. One further advantage is the small space consumption of 3n+O(log n) pointers. In this paper we propose rank-relaxed weak queues, reducing the number of rank violations nodes for each level to a constant, while pro...
متن کاملMeasuring and Improving the Performance of Cache-efficient Priority Queues in Dijkstra’s Algorithm
The priority queue is an useful data structure in computation. There currently exist many implementations of this data structure, including some that are cache-aware and some cache-oblivious. In this study, we compare the performance of several implementations of priority queues in Dijkstra’s Single Source Shortest Path algorithm. We compare high performance heaps, such as the 4ary Aligned Heap...
متن کاملA Survey on Priority Queues
Back in 1964 Williams introduced the binary heap as a basic priority queue data structure supporting the operations Insert and ExtractMin in logarithmic time. Since then numerous papers have been published on priority queues. This paper tries to list some of the directions research on priority queues has taken the last 50 years.
متن کامل